textbuffer: nicer get_iter functions, without return values
authorSébastien Wilmet <swilmet@gnome.org>
Thu, 12 Nov 2015 16:43:32 +0000 (17:43 +0100)
committerSébastien Wilmet <swilmet@gnome.org>
Thu, 12 Nov 2015 16:50:39 +0000 (17:50 +0100)
commit1685da6f696166588357b2e999da082cf731518f
treebb4d1377107511dd7a87a23e91940cb7de0684f3
parent1f5f3ca41bd2419e1aee3f210f683541a8a3f56f
textbuffer: nicer get_iter functions, without return values

Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A first attempt added boolean return values to know if @iter has been set to
the exact location, but it breaks Python and JS bindings because the out
parameter is already a return value in those languages.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
gtk/gtktextbuffer.c
testsuite/gtk/textbuffer.c